package org.com.liurz.iresources.activiti.listener;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.activiti.engine.delegate.Expression;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
 * 流程监听器：流程实例start、end、take的时候调用。take是监控连线的时候使用的。
 *
 *
 * @author liurz
 * @version V1.0
 * @Package org.com.liurz.iresources.activiti.listener
 * @date 2021/8/28 0:05
 * @Copyright © 2020-2028
 */
@Service("MyExectuionListener")
public class MyExectuionListener implements Serializable, ExecutionListener {
    private Expression message;

    public Expression getMessage() {
        return message;
    }

    public void setMessage(Expression message) {
        this.message = message;
    }

    @Override
    public void notify(DelegateExecution execution) {
        System.out.println("流程监听器" + message.getValue(execution));
    }
}
